package com.com.yunzong.rainbowbridge.network;


import com.yz.jdd.base.entity.Response_Base;

import java.util.List;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by zark on 2018/1/23.
 * Desc:
 */

public interface BridgeObservable {


    /**
     * 客户端收到语音推送后回调服务端播报结果
     *
     * @param request_callBack
     * @return
     */
    @POST("boss/push/callBack.do")
    Observable<Response_Base> doVoiceCallBack(@Body Request_CallBack request_callBack);


    /**
     * 批量上报接口
     * app接收到消息：achievedTime
     app开始播报：beginPlayTime
     app播报结束：endPlayTime
     播报耗时：broadcastTime
     Post数据:{
     "networkType" : "WiFi",
     "orderId" : "12321312321321",
     "reason" : "",
     "broadcastTime" : "4062",
     "platform" : "2",
     "broadcastResult" : "2",
     "achievedTime" : "1556177662904",
     "endPlayTime" : "1556177666965",
     "guid" : "87eb5eca95cb4cdf90e3e4b080415a9a",
     "beginPlayTime" : "1556177662952",
     "firstChannel" : "5"
     }
     */
    @POST("boss/push/batchCallBack.do")
    Observable<Response_Base> doVoiceBatchCallBack(@Body List<Request_CallBack> request_callBacks);

    //心跳获取设备策略接口
    @POST("heartbeat/agent.do")
    Observable<Response_Base> doHeartBeat(@Body Request_Heartbeat request_Heartbeat);

    /**
     * 上传七牛出错时，上传服务器
     */
    @POST("agentUploadFile.do")
    Observable<Response_Base> agentUploadFile(@Body RequestBody params);

    /**
     * 指令执行结果
     *
     * @return
     */
    @POST("heartbeat/strategy/callback.do")
    Observable<Response_Base> doCallBack(@Body Request_Operate request_operate);

}
